<div class="row">
	<div class="col col-md-12">
		<div id="index-carousel" class="carousel slide" data-ride="carousel">
			<!-- Indicators -->
			<ol class="carousel-indicators">
					{func model=app action=get_ad item=ad_list code="indexad"}
					{foreach from=$ad_list item=ad name=indexad}
				<li data-target="#index-carousel" data-slide-to="{$smarty.foreach.indexad.index}" class="{if $smarty.foreach.indexad.index==0} active{/if}"></li>
				{/foreach}
			</ol>

			<!-- Wrapper for slides -->
			<div class="carousel-inner" role="listbox">
			
		{foreach from=$ad_list item=ad name=indexad}
		<div class="item {if $smarty.foreach.indexad.index==0} active{/if}">
					<img src="{$ad.pic_path}" alt="{$ad.title}">
				</div>
		{/foreach}
				
			</div>

			<!-- Controls -->
			<a class="left carousel-control" href="#index-carousel" role="button" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left"></span>
				<span class="sr-only">Previous</span>
			</a>
			<a class="right carousel-control" href="#index-carousel" role="button" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right"></span>
				<span class="sr-only">Next</span>
			</a>
		</div>
	</div>
</div>